#!/bin/bash

# 创建 .desktop 文件
DESKTOP_FILE="$HOME/.local/share/applications/chat-translator.desktop"
cat > "$DESKTOP_FILE" <<EOL
[Desktop Entry]
Name=Chat Translator
Comment=A translation chat application
Exec=env TENCENT_SECRET_ID=$TENCENT_SECRET_ID TENCENT_SECRET_KEY=$TENCENT_SECRET_KEY $PWD/build/bin/chat-translator
Icon=$PWD/build/appicon.png
Terminal=false
Type=Application
Categories=Utility;Application;
EOL

# 设置可执行权限
chmod +x "$DESKTOP_FILE"